<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-payCurrency-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">虚拟货币名字：</label>
				<div class="col-sm-8">
					<input id="symbol" name="symbol" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">智能合约地址：</label>
				<div class="col-sm-8">
					<input id="contractAddress" name="contractAddress" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">小数位数长度：</label>
				<div class="col-sm-8">
					<input id="decimals" name="decimals" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">默认货币：</label>
				<div class="col-sm-8">
					<select name="isDefault" class="form-control m-b" th:with="type=${@dict.getType('pay_yes_no')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">缩写：</label>
				<div class="col-sm-8">
					<input id="shortName" name="shortName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">固定汇率：</label>
				<div class="col-sm-8">
					<input id="oneRate" name="oneRate" class="form-control" type="text">
				</div>
			</div>






			<div class="form-group">	
				<label class="col-sm-3 control-label">货币编号：</label>
				<div class="col-sm-8">
					<input id="code" name="code" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">货币符号：</label>
				<div class="col-sm-8">
					<input id="flag" name="flag" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">LOGO：</label>
				<div class="col-sm-8">
					<input id="logo" name="logo" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">是否固定：</label>
				<div class="col-sm-8">
					<select name="isOneRate" class="form-control m-b" th:with="type=${@dict.getType('pay_yes_no')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>


			<div class="form-group">	
				<label class="col-sm-3 control-label">启用状态：</label>
				<div class="col-sm-8">
					<select name="isActive" class="form-control m-b" th:with="type=${@dict.getType('pay_yes_no')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>

			<div class="form-group">	
				<label class="col-sm-3 control-label">货币名字：</label>
				<div class="col-sm-8">
					<input id="fullName" name="fullName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">汇率：</label>
				<div class="col-sm-8">
					<input id="currencyRate" name="currencyRate" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">请求地址：</label>
				<div class="col-sm-8">
					<input id="rateUrl" name="rateUrl" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">回调代码：</label>
				<div class="col-sm-8">
					<input id="callback" name="callback" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">状态码：</label>
				<div class="col-sm-8">
					<input id="resCode" name="resCode" class="form-control" type="text">
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "manager/currency"
		$("#form-payCurrency-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-payCurrency-add').serialize());
	        }
	    }
	</script>
</body>
</html>
